#ifndef MODEL_BOOST_TIME_INTERVAL_TRAITS_HPP
#define MODEL_BOOST_TIME_INTERVAL_TRAITS_HPP

#include "Model/ModelConfig.hpp"
#include <boost/date_time/posix_time/posix_time_types.hpp>

namespace Model
{

	struct MODEL_API BoostTimeIntervalTraits
	{
		typedef boost::posix_time::ptime value_type;
		typedef boost::posix_time::time_period interval_type;

		inline static value_type begin( const interval_type& i) { return i.begin(); }
		inline static value_type end( const interval_type& i) { return i.end(); }
		inline static interval_type make_interval( const value_type& b, const value_type& e) { return interval_type( b, e); }
		inline static bool less( const value_type& op1, const value_type& op2) { return op1 < op2; }
		inline static bool start_less( const interval_type& op1, const interval_type& op2) { return op1.begin() < op2.begin(); }
		inline static bool interval_contains( const interval_type& i, const value_type v) 
		{
			return i.contains( v);
		}
	};

} // namespace Model

#endif // MODEL_BOOST_TIME_INTERVAL_TRAITS_HPP
